RND-2072: analytics - #3033
Draft
StylianosGakis wants to merge 7 commits into
Draft
Conversation
Introduce a shared CrossSellImpressionTracker (fun interface + Metro @ContributesBinding) in ui/cross-sells that fires the Firebase "cross_sell_shown" event once per offer, with user_flow, cross_sell_type, offer_id and (for the after-flow surface) flow_source. Add the crossSellSheetShown helper (mirrors the sheet's addon-over-cross-sell render priority) and an optional per-item onCrossSellImpression callback on CrossSellsSection, backed by Modifier.onVisibilityChanged so inline lists can report impressions on scroll-into-view. The callback defaults to null, so the sheets that reuse CrossSellsSection are unaffected.
Fire an impression per offer when the smart cross-sell sheet becomes visible, with user_flow=smart_x_sell and flow_source mapped from the CrossSellInfoType of the flow the member just completed. Add a presenter test asserting the per-offer events.
Track both home cross-sell surfaces distinctly: the toolbar bottom sheet as user_flow=insurance_card (per offer when it becomes visible), and the inline home sections (Offers, Discover insurances, Addons) as user_flow=home_screen via onVisibilityChanged, deduped per screen visit in the presenter.
Report an impression per offer as it scrolls into view on the insurances tab (user_flow=insurance_screen), covering both the cross-sell list and the addon banners (identified by flow type, since addon banners carry no per-offer id). Impressions are deduped per screen visit in the presenter.
Match the field name used on web (and in the tracking registry) so the column lines up across platforms. Only the emitted key changes; the internal enum stays CrossSellType.
For list add-on banners (insurances tab, inline home) the offer_id is the add-on flow type; lowercase it so it reads as snake_case like the other enum values in the registry (app_travel_plus_sell_only, app_car_plus).
StylianosGakis
marked this pull request as ready for review
August 3, 2026 10:04
StylianosGakis
marked this pull request as draft
August 3, 2026 10:08
panasetskaya
approved these changes
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP from https://docs.google.com/document/d/1APbE4o1R5BWspMwRVbW1cmyuQoRkLMuv7rAPlLLsXys/edit?tab=t.0